﻿@model MaterialProcess
@{
    ViewBag.Title = "加工入库";
    Layout = "~/Views/Shared/_LayoutFormDetail.cshtml";
    ViewBag.SaveAction = "Storage";
}
@section Up{
    @Html.HiddenFor(model => model.Id)
    @Html.HiddenFor(model => model.OrderState)
    @Html.nbDateFor(model => model.ProcessDate).Required()
    @Html.nbTextBoxFor(model => model.TotalWeight).ReadOnly()
}
@section Down{
    @(Html.nbDetailFor<MaterialProcessItem>(s =>
    {
        s.layoutW(10);
        s.layoutH(130);
        s.Columns(col =>
        {
            col.Bind(e => e.Id).IsKey();
            col.Bind(e => e.OrderId).Hide();
            col.Bind(e => e.MaterialId).Hide();
            col.Bind(e => e.Date).Hide();
            col.Bind(e => e.Code).Width(60);
            col.Bind(e => e.Name).Width(60).Align(GridAlign.Left);
            col.BindEnum(e => e.Category, "MaterialCategory").Width(60);
            col.Bind(e => e.RawMaterialId).Hide();
            col.Bind(e => e.RawMaterialName).Width(60).Align(GridAlign.Left);
            col.Bind(e => e.ProcessRate).Width(40).Align(GridAlign.Right);
            col.Bind(e => e.ProcessWeight).Align(GridAlign.Right).Width(50);
            col.Bind(e => e.PickWeight).Align(GridAlign.Right).Width(50);
            col.BindControl(e => e.StorageWeight).Align(GridAlign.Right).Width(50);
        });
    }))
}
